package com.mashiro.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mashiro.common.annotation.Excel;
import com.mashiro.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 消息对象 moe_message
 *
 * @author mashiro
 * @date 2023-04-14
 */
public class MoeMessage extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    private Long id;

    /**
     * 发送者ID
     */
    @Excel(name = "发送者ID")
    private Long senderId;

    /**
     * 发送者
     */
    @Excel(name = "发送者")
    private String senderName;

    /**
     * 接收者ID
     */
    @Excel(name = "接收者ID")
    private Long receiverId;

    /**
     * 接收者
     */
    @Excel(name = "接收者")
    private String receiverName;

    /**
     * 标题
     */
    @Excel(name = "标题")
    private String title;

    /**
     * 消息体
     */
    private String content;

    /**
     * 类别
     */
    @Excel(name = "类别")
    private String type;

    /**
     * 是否已读
     */
    @Excel(name = "是否已读")
    private String readStatus;

    /**
     * 阅读时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "阅读时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readTime;

    /**
     * 公告ID
     */
    private Long noticeId;

    /**
     * 删除标志
     */
    private String delFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSenderId() {
        return senderId;
    }

    public void setSenderId(Long senderId) {
        this.senderId = senderId;
    }

    public Long getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(Long receiverId) {
        this.receiverId = receiverId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(String readStatus) {
        this.readStatus = readStatus;
    }

    public Date getReadTime() {
        return readTime;
    }

    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public Long getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(Long noticeId) {
        this.noticeId = noticeId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("senderId", getSenderId())
                .append("senderName", getSenderName())
                .append("receiverId", getReceiverId())
                .append("receiverName", getReceiverName())
                .append("title", getTitle())
                .append("content", getContent())
                .append("type", getType())
                .append("readStatus", getReadStatus())
                .append("readTime", getReadTime())
                .append("noticeId", getNoticeId())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
